<?php	
/*****************************************************************************\

PHP "jeegoon.com object function " library
@function:GetMemberByName
@version: 0.1 - 12/23/2007
@author: Seraph Jiang - http://www.jeegoon.com/wordpress/
\*****************************************************************************/
	require_once("class.member.php");	
	require_once("class.db.jeegoon.php");	
		
	function GetMemberByName($UserName)	
	{	
	  if(is_string($UserName))	
	  {	
	    try	
	    {	
	      $sh1 = new jeegoon();	
	      $result = $sh1->query("select * from member where Name='" . $UserName  . "';");	
	      	
	      $arr=array();	
	      $i=0;	
	      while ($line = mysql_fetch_array($result, MYSQL_BOTH)) {	
	      	
	        $arr[$i]=$line;	
	      $i++;	
	      }	
	      $mb = new Member();	
	      $mb->ID = $arr[0][0];	
	      $mb->Name = $arr[0][1];	
	      $mb->Password = $arr[0][2];	
	      $mb->Email = $arr[0][3];	
		
	      return $mb;	
	    }	
	    catch(Exception $e)	
	    {	
	      return new soap_falut('client','','GetMemberByName Error!');	
		
	    }	
	  }	
	  else	
	  {	
	    return new soap_falut('client','','GetMemberByName Error!');	
	  } 	
	}	
?>